package ca.etsmtl.log660.servlet;

import ca.etsmtl.log660.entity.Client;
import ca.etsmtl.log660.entity.Film;
import ca.etsmtl.log660.view.FrameSystem;

/*
 * Singleton qui stock les informations courantes du systeme.
 */
public class Controler {
	private FrameSystem systeme;
	private Client clientCourant;
	private Film filmCourant;
	private static Controler controler;
	
	public Controler(){
		systeme = new FrameSystem();
	}
	
	public static Controler getControler() {
        if (null == controler) { controler = new Controler(); }
        
        return controler;
    }
	
	public FrameSystem getSysteme(){
		return systeme;
	}
	
	public void setClientCourant(Client cli){
		this.clientCourant=cli;
	}
	
	public Client getClientCourant(){
		return this.clientCourant;
	}
	
	public void setFilmCourant(Film film){
		this.filmCourant=film;
	}
	
	public Film getFilmCourant(){
		return this.filmCourant;
	}
}
